package com.itfenghuang.day10;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/*
    FileInputStream
 */
public class A02_字节输入流 {
    public static void main(String[] args) throws IOException {
        /*
            1.构造方法:public FileInputStream(String name)创建字节输入流对象
            2.读的方法:public int read()一次读一个字节
         */
//        一次读取一个字节
        FileInputStream fis = new FileInputStream("E:\\itfenghuang\\enen\\新建文本文档.txt");
        int r1 = fis.read();
        int r2 = fis.read();
        int r3 = fis.read();
        int r4 = fis.read();
        char c1 = (char) r1;
        System.out.println(c1);
        System.out.println(r4);
//        System.out.println(fis);
    }
}
